#include <tinx/stdio.h>
#include <tinx/string.h>

int main(int argc, char *argv[])
{
    fd_t fd = open("./", O_RDONLY, 0);

    while (1)
    {
        dentry_t entry;
        int ret = readdir(fd, &entry, 0);
        if (ret <= 0)
            break;
        if (!entry.name[0])
            continue;
        if (!strcmp(entry.name, "..") || !strcmp(entry.name, "."))
            continue;
        printf("%s ", entry.name);
    }
    printf("\n");

    close(fd);
}
